Explicit test for None.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 14 Sep 2005 19:52:04 +0000 (19:52 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 14 Sep 2005 19:52:04 +0000 (19:52 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/xenstore/xstransact.py

index 94a9bda1bd1313cc84dafe5a0d74d85cceed2a6b..62dfc496279033b3a67ec5e122eb4dc5b6f3368d 100644 (file)
@@ -138,10 +138,10 @@ class xstransact:
                     raise TypeError
             else:
                 (key, val, fmt) = tup
-            if val:
-                self._write(key, fmt % val)
-            else:
+            if val is None:
                 self._remove(key)
+            else:
+                self._write(key, fmt % val)
 
 
     def Read(cls, path, *args):